package main

import (
	"log"
	"net/rpc"

	"gitee.com/mayxiangfan/go-study/rpc/models"
)

// 目前遇到的问题，int 、string 类型的值能取到， 切片的值取不到 不知道为什么？？？？？？？？？？
func main() {
	http, err := rpc.DialHTTP("tcp", "127.0.0.1:8082")
	if err != nil {
		log.Fatal(err.Error())
	}
	request := models.UserRequest{Id: 0}
	response := &models.UserResponse{}
	err = http.Call("UserService.GetUser", request, response)
	if err != nil {
		log.Fatal(err.Error())
	}
	log.Println(response)
}
